<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>上传模板</title>
    <meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="Cache-Control" content="no-cache, must-revalidate">
	<meta http-equiv="expires" content="Mon, 23 Jan 1978 20:52:30 GMT">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="this is my page">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    
    <link href="/include/css/admin.css" type=text/css rel=stylesheet>
	<script>
	function setImg(){
		if(document.templateForm.img.value!=""){
			document.all.image.src = document.templateForm.img.value;
		}
	}
	function pageClose(){
		window.returnValue="";
		window.close();
	}
	function submitForm(){
		if(templateForm.name.value=="")
		{
			alert("名称不能为空!");
			return;
		}
		if(templateForm.template.value=="")
		{
			alert("文件不能为空!");
			return;
		}
		if(templateForm.img.value=="")
		{
			alert("文件不能为空!");
			return;
		}
		templateForm.submit();
		//window.close();
	}
	</script>
    
    <style type="text/css">
<!--
.STYLE2 {font-size: 12px}
.STYLE1 {	font-size: 12px;
	font-weight: bold;
}
.tdstyle{
background-color:#FFFFFF;
font-size:12px;
}
body {
	background-color: #f1fefa;
}
-->
    </style>
 #if ($msg)
<script>
alert($!msg);
</script>
#end
</head>
  <base target="_self">
  <body>
  <form action="blogTemplate.do" method="post" enctype="multipart/form-data" name="templateForm" id="templateForm">
  <input type="hidden" name="parameter"  value="add" >
    <table height="148" border="0" cellpadding="0" cellspacing="10" bgcolor="#f1fefa" id="table">
      <tr>
        <td width="290" height="127" valign="top" bgcolor="#f1fefa"><table width="290" height="134" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#cccccc">
          <tr>
            <td height="27" colspan="2" class="tdstyle"><div align="center" class="STYLE2">
                <div align="left"><span class="font06"><img  src="/images/dc_img14.gif" /></span>
                #if($!cid!='')
                修改模板
                #else
                 上传模板
                #end
                </div>
            </div></td>
          </tr>
          <tr>
            <td width="80" class="tdstyle"><div align="right"><span class="STYLE2">名&nbsp;&nbsp;&nbsp;&nbsp;称：</span></div></td>
            <td width="207" class="tdstyle"><input name="title" type="text" id="title" size="15" value="$!title" /></td>
          </tr>
          <tr>
            <td class="tdstyle"><div align="right"><span class="STYLE2">模&nbsp;&nbsp;&nbsp;&nbsp;板：</span></div></td>
            <td class="tdstyle"> 
            #if($!cid!='') 
             $!url
            #else 
            <input name="template" type="file" id="template" size="20" /> 
            #end
            </td>
          </tr>
          <tr>
            <td class="tdstyle"><div align="right"><span class="STYLE2">预览图片：</span></div></td>
            <td class="tdstyle"><input name="img" type="file" id="img" size="20" onChange="setImg()" /></td>
          </tr>
          
          <tr>
            <td colspan="2" class="tdstyle"><div align="center">
  <input type="button" name="Submit" value="提交上传" onClick="submitForm()" />
  &nbsp;&nbsp;&nbsp;&nbsp;
  <input type="button" name="Submit2" value="关闭窗口" onClick="pageClose()" />
  
            </div></td>
          </tr>
        </table></td>
        <td width="158" valign="top" bgcolor="#f1fefa"><table width="158" height="134" border="0" cellpadding="0" cellspacing="1" bgcolor="#cccccc" id="table">
            <tr bgcolor="#ffffdd">
              <td height="27" bgcolor="#ffffdd"><div align="right"><span class="STYLE1">◇预览图片◇</span></div></td>
            </tr>
            <tr>
              <td width="186" height="100" align="center" class="tdstyle" id="td">
			  <div align="center"><img id="image" src="/images/img.jpg" name="image" width="120" height="100"/></div></td>
            </tr>
        </table></td>
      </tr>
    </table>
  </form>
  </body>
</html>
<!--
# if($isAdmin)
# else
<script>
alert("对不起！你没有权限访问此页面！");
HISTORY.GO(-1);
</script>
# end
-->